package jun.learn.spring.threadexecutor;

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

public class TaskExeTest {
	public static void main(String[] args) {
		ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
		taskExecutor.setCorePoolSize(5);
		taskExecutor.setMaxPoolSize(10);
		taskExecutor.setQueueCapacity(100);
		taskExecutor.initialize();
		
		TaskExecutorSample executorSample = new TaskExecutorSample(taskExecutor);
		executorSample.printMessage();
//		for(;;){
//			int activeCount = taskExecutor.getActiveCount();
//			if(activeCount == 0){
//				taskExecutor.shutdown();
//				break;
//			}
//		}
	}
}
